How to instantiate a class from a running process